package com.nit.lab.service.basic;

import com.nit.lab.dto.basic.GoodsDTO;
import com.nit.lab.dto.basic.GoodsListDTO;
import com.nit.lab.dto.utils.TableReqDTO;
import com.nit.lab.dto.utils.TableRspDTO;
import com.nit.lab.entity.basic.GoodsEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


public interface GoodsService {
    /**
     * @Description: 获取表格数据
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    TableRspDTO list4Table(TableReqDTO tableReqDTO) throws Exception;
//注释！
    /**
     * @Description: 新增记录
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer add(GoodsDTO goodsDTO) throws Exception;

    /**
     * @Description: 更新记录
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer update(GoodsDTO goodsDTO) throws Exception;

    /**
     * @Description: 删除记录
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer remove(String goodsId) throws Exception;

    /**
     * @description: 下载文件
     * @Author: WJM
     * @Date: 2022/7/1 14:15
     **/
    String upload(MultipartFile file) throws Exception;

    /**
     * @description: 获取用户拥有藏品
     * @Author: SKW
     * @Date: 2022/7/1 14:15
     **/
    List<GoodsEntity> getByUser(String owner) throws Exception;

    /**
     * @Description: 根据listId获取表格数据
     * @Author: SKW
     * @Date: 2019/01/31 11:02
     */
    TableRspDTO list4TableByListId(TableReqDTO tableReqDTO) throws Exception;
    /**
     * @description: 批量新增
     * @Author: WJM
     * @Date: 2022/7/17 1:51
     **/
    Integer addAll(List<GoodsDTO> goodsDTO) throws Exception;
}
